/*
 * © 2024 huayunliufeng保留所有权利, 依据MIT许可证发布。
 * 请勿更改或删除版权声明或此文件头。
 * 此代码是免费软件, 您可以重新分发和/或修改它。
 * 开源是希望它有用, 但不对代码做任何保证。
 * 如有疑问请联系: huayunliufeng@163.com
 */

package io.github.huayunliufeng.common.constant;

import lombok.Getter;

/**
 * ascii码表的枚举
 *
 * @author zhongq
 * @datetime 2024/4/2 16:16
 */
@Getter
public enum AsciiEnum {
    NUL('\u0000', 0x00, "空字符"),
    SOH('\u0001', 0x01, "标题开始"),
    STX('\u0002', 0x02, "正文开始"),
    ETX('\u0003', 0x03, "正文结束"),
    EOT('\u0004', 0x04, "传输结束"),
    ENQ('\u0005', 0x05, "请求"),
    ACK('\u0006', 0x06, "收到通知"),
    BEL('\u0007', 0x07, "响铃"),
    BS('\u0008', 0x08, "退格"),
    HT('\t', 0x09, "水平制表符"),
    LF('\n', 0x0A, "换行键"),
    VT('\u000B', 0x0B, "垂直制表符"),
    FF('\u000C', 0x0C, "换页键"),
    CR('\r', 0x0D, "回车键"),
    SO('\u000E', 0x0E, "不用切换"),
    SI('\u000F', 0x0F, "启用切换"),
    DLE('\u0010', 0x10, "数据链路转义"),
    DC1('\u0011', 0x11, "设备控制1"),
    DC2('\u0012', 0x12, "设备控制2"),
    DC3('\u0013', 0x13, "设备控制3"),
    DC4('\u0014', 0x14, "设备控制4"),
    NAK('\u0015', 0x15, "拒绝接收"),
    SYN('\u0016', 0x16, "同步空闲"),
    ETB('\u0017', 0x17, "结束传输块"),
    CAN('\u0018', 0x18, "取消"),
    EM('\u0019', 0x19, "媒介结束"),
    SUB('\u001A', 0x1A, "代替"),
    ESC('\u001B', 0x1B, "换码(溢出)"),
    FS('\u001C', 0x1C, "文件分隔符"),
    GS('\u001D', 0x1D, "分组符"),
    RS('\u001E', 0x1E, "记录分隔符"),
    US('\u001F', 0x1F, "单元分隔符"),
    SPACE(' ', 0x20, "空格"),
    EXCLAMATION_MARK('!', 0x21, "叹号"),
    DOUBLE_QUOTATION_MARKS('"', 0x22, "双引号"),
    WELL_NUMBER('#', 0x23, "井号"),
    DOLLAR_SIGN('$', 0x24, "美元符"),
    PER_CENT('%', 0x25, "百分号"),
    AMPERSAND('&', 0x26, "和号"),
    CLOSED_SINGLE_QUOTATION_MARK('\'', 0x27, "闭单引号"),
    OPENING_BRACKET('(', 0x28, "开括号"),
    CLOSING_BRACKET(')', 0x29, "闭括号"),
    ASTERISK('*', 0x2A, "星号"),
    PLUS_SIGN('+', 0x2B, "加号"),
    COMMA(',', 0x2C, "逗号"),
    MINUS('-', 0x2D, "减号/破折号"),
    FULL_STOP('.', 0x2E, "句号"),
    SLASH('/', 0x2F, "斜杠"),
    NUMBER_0('0', 0x30, "字符0"),
    NUMBER_1('1', 0x31, "字符1"),
    NUMBER_2('2', 0x32, "字符2"),
    NUMBER_3('3', 0x33, "字符3"),
    NUMBER_4('4', 0x34, "字符4"),
    NUMBER_5('5', 0x35, "字符5"),
    NUMBER_6('6', 0x36, "字符6"),
    NUMBER_7('7', 0x37, "字符7"),
    NUMBER_8('8', 0x38, "字符8"),
    NUMBER_9('9', 0x39, "字符9"),
    COLON(':', 0x3A, "冒号"),
    SEMICOLON(';', 0x3B, "分号"),
    LESS_THAN('<', 0x3C, "小于"),
    EQUALS('=', 0x3D, "等号"),
    GREATER_THAN('>', 0x3E, "大于"),
    QUESTION_MARK('?', 0x3F, "问号"),
    AT('@', 0x40, "电子邮件符号"),
    A('A', 0x41, "大写字母A"),
    B('B', 0x42, "大写字母B"),
    C('C', 0x43, "大写字母C"),
    D('D', 0x44, "大写字母D"),
    E('E', 0x45, "大写字母E"),
    F('F', 0x46, "大写字母F"),
    G('G', 0x47, "大写字母G"),
    H('H', 0x48, "大写字母H"),
    I('I', 0x49, "大写字母I"),
    J('J', 0x4A, "大写字母J"),
    K('K', 0x4B, "大写字母K"),
    L('L', 0x4C, "大写字母L"),
    M('M', 0x4D, "大写字母M"),
    N('N', 0x4E, "大写字母N"),
    O('O', 0x4F, "大写字母O"),
    P('P', 0x50, "大写字母P"),
    Q('Q', 0x51, "大写字母Q"),
    R('R', 0x52, "大写字母R"),
    S('S', 0x53, "大写字母S"),
    T('T', 0x54, "大写字母T"),
    U('U', 0x55, "大写字母U"),
    V('V', 0x56, "大写字母V"),
    W('W', 0x57, "大写字母W"),
    X('X', 0x58, "大写字母X"),
    Y('Y', 0x59, "大写字母Y"),
    Z('Z', 0x5A, "大写字母Z"),
    OPEN_SQUARE_BRACKET('[', 0x5B, "开方括号"),
    BACKSLASH('\\', 0x5C, "反斜杠"),
    CLOSE_SQUARE_BRACKET(']', 0x5D, "闭方括号"),
    CARET('^', 0x5E, "脱字符"),
    UNDERLINE('_', 0x5F, "下划线"),
    SINGLE_QUOTATION_MARKS('`', 0x60, "开单引号"),
    LOWER_A('a', 0x61, "小写字母a"),
    LOWER_B('b', 0x62, "小写字母b"),
    LOWER_C('c', 0x63, "小写字母c"),
    LOWER_D('d', 0x64, "小写字母d"),
    LOWER_E('e', 0x65, "小写字母e"),
    LOWER_F('f', 0x66, "小写字母f"),
    LOWER_G('g', 0x67, "小写字母g"),
    LOWER_H('h', 0x68, "小写字母h"),
    LOWER_I('i', 0x69, "小写字母i"),
    LOWER_J('j', 0x6A, "小写字母j"),
    LOWER_K('k', 0x6B, "小写字母k"),
    LOWER_L('l', 0x6C, "小写字母l"),
    LOWER_M('m', 0x6D, "小写字母m"),
    LOWER_N('n', 0x6E, "小写字母n"),
    LOWER_O('o', 0x6F, "小写字母o"),
    LOWER_P('p', 0x70, "小写字母p"),
    LOWER_Q('q', 0x71, "小写字母q"),
    LOWER_R('r', 0x72, "小写字母r"),
    LOWER_S('s', 0x73, "小写字母s"),
    LOWER_T('t', 0x74, "小写字母t"),
    LOWER_U('u', 0x75, "小写字母u"),
    LOWER_V('v', 0x76, "小写字母v"),
    LOWER_W('w', 0x77, "小写字母w"),
    LOWER_X('x', 0x78, "小写字母x"),
    LOWER_Y('y', 0x79, "小写字母y"),
    LOWER_Z('z', 0x7A, "小写字母z"),
    OPEN_CURLY_BRACKET('{', 0x7B, "开花括号"),
    VERTICAL_BAR('|', 0x7C, "竖线"),
    CLOSE_CURLY_BRACKET('}', 0x7D, "闭花括号"),
    TILDE('~', 0x7E, " 波浪号"),
    DEL('\u007F', 0x7F, "删除");

    private final char code;
    private final int value;
    private final String desc;

    AsciiEnum(char code, int value, String desc) {
        this.code = code;
        this.value = value;
        this.desc = desc;
    }
}
